package com.example.easy.Service.Impl;

import com.example.easy.Service.myservice.AdministratorsService;
import com.example.easy.mapper.AdministratorsMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class Administratorslmpl implements AdministratorsService{

    @Autowired
    AdministratorsMapper administratorsMapper;

    @Override
    public boolean login(String username, String psd) {
        String sqlpsd = administratorsMapper.selectPsd(username);
        if (sqlpsd == null) {
            return false;
        } else {
            if (psd.equals(administratorsMapper.selectPsd(username))) {
                return true;
            } else {
                return false;
            }
        }
    }
}
